<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>propsData Option</title>
    <link rel="stylesheet" href="../../../assets/css/bootstrap.min.css">
    <script src="../../../assets/js/vue-2.5.6.js"></script>
</head>
<!--propsData不是和属性有关，他用在全局扩展时进行传递数据-->

<body>
    <header></header>
</body>
<script>
    // var header_a = Vue.extend({
    //     template: `<p>{{message}}</p>`,
    //     data: function() {
    //         return {
    //             message: 'Hello,I am Header'
    //         }
    //     }
    // });
    // new header_a().$mount('header');
    var header_a = Vue.extend({
        template: `<p>{{message}}-{{a}}</p>`,
        data: function() {
            return {
                message: 'Hello,I am Header'
            }
        },
        props: ['a']
    });
    new header_a({
        propsData: {
            a: 1
        }
    }).$mount('header');
</script>

</html>